//
//  HHTextFiledView.m
//  quxiangtao
//
//  Created by HHuajiang on 2018/11/21.
//  Copyright © 2018 shanhaijin. All rights reserved.
//

#import "HHTextFiledView.h"

@implementation HHTextFiledView

- (instancetype)initwithTitle:(NSString *)title Place:(NSString *)place Label:(NSString *)label {
    if (self == [super init]) {

                
        UIView *_bottomLine = [[UIView alloc] init];
        _bottomLine.backgroundColor = Colordddddd;
        [self addSubview:_bottomLine];
        [_bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.bottom.mas_equalTo(0);
            make.height.mas_equalTo(0.5);
        }];
        
        UILabel *_exchangeMoneyL = [[UILabel alloc] init];
        _exchangeMoneyL.textColor = Color333333;
        _exchangeMoneyL.font = Font(24);
        _exchangeMoneyL.textAlignment = NSTextAlignmentLeft;
        _exchangeMoneyL.text = title;
        [self addSubview:_exchangeMoneyL];
        [_exchangeMoneyL mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(0);
            make.centerY.equalTo(self.mas_centerY);
        }];
        
        UITextField  *_exchangeMoneyTextField = [[UITextField alloc] init];
        _exchangeMoneyTextField.textColor = Color333333;
        _exchangeMoneyTextField.font = Font(24);
        _exchangeMoneyTextField.textAlignment = NSTextAlignmentLeft;
        _exchangeMoneyTextField.placeholder = place;
        _exchangeMoneyTextField.keyboardType = UIKeyboardTypeDecimalPad;
        [self addSubview:_exchangeMoneyTextField];
        [_exchangeMoneyTextField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(100);
            make.right.mas_equalTo(-50);
            make.height.mas_equalTo(50);
            make.centerY.equalTo(self.mas_centerY);
        }];
        self.field = _exchangeMoneyTextField;
        
        UILabel *lllll = [[UILabel alloc] init];
        lllll.textColor = Color333333;
        lllll.font = Font(24);
        lllll.textAlignment = NSTextAlignmentLeft;
        lllll.text = label;
        [self addSubview:lllll];
        [lllll mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(0);
            make.centerY.equalTo(self.mas_centerY);
        }];
        
    }
    return self;
}

@end
